perm filename LETTER.TEX[WEB,ALS]1 blob sn#736175 filedate 1983-12-30 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00006 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	\magnification=\magstep1
C00008 00003	%\stanford
C00044 00004	\def\today{\ifcase\month\or
C00049 00005	Let's consider {business letters} first. Suppose that you want \TeX\ to
C00064 00006	\beginchapter Appendix E. Example Formats
C00080 ENDMK
CāŠ—;
\magnification=\magstep1
\font\smallheadfont=amr8 
\font\largeheadfont=amdunh10 
%\font\ninerm=amr9 
\font\seal=stan70
\font\Dunh=amdunh10
\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}

\raggedbottom
\interlinepenalty=1000
\hsize=6.25truein
%\voffset=24pt
%\advance\vsize by-\voffset
\parindent=0pt
\parskip=0pt
\nopagenumbers
\footline={\ifnum\pageno>1
  \smallheadfont \addressee\hfil\today\qquad \folio
  \else\hfil\fi}

\def\beginlinemode{\endmode
  \begingroup\obeylines\def\endmode{\par\endgroup}}
\def\beginparmode{\endmode
  \begingroup\parskip=\medskipamount \def\endmode{\par\endgroup}}
\let\endmode=\par
\def\endletter{\endmode\vfill\supereject}

\newdimen\longindentation \longindentation=4truein
\newbox\theaddress
\def\address{\beginlinemode\getaddress}
{\obeylines\gdef\getaddress #1
  #2
  {#1\gdef\addressee{#2}%
    \global\setbox\theaddress=\vbox\bgroup\raggedright%
     \hsize=3.25truein\everypar{\hangindent2em}#2
%    \hsize=\longindentation \everypar{\hangindent2em}#2
    \def\endmode{\egroup\endgroup \copy\theaddress \bigskip}}}

\def\body{\beginparmode}
\def\annotations{\beginlinemode\def\par{\endgraf\nobreak}\obeylines\par}
\def\ps{\beginparmode\nobreak
  \interlinepenalty5000\def\par{\endgraf\penalty5000}}

\def\up#1{\leavevmode \raise.16ex\hbox{#1}}

\def\personal{\pageno=1
  \def\sendingaddress{Arthur L. Samuel\par
    The Sequoias\par
    501 Portola Road, box 8214\par
    Portola Valley, CA 94025\par
    \up[415\up]\thinspace 424-4233\par}
  \def\returnaddress{Arthur L. Samuel\par
    The Sequoias\par
    501 Portola Road, box 8214\par
    Portola Valley, CA 94025 USA}
\centerline{Arthur L. Samuel}
\centerline{The Sequoias}
\centerline{501 Portola Rd. box 8214}
\centerline{Portola Valley, CA 94025}
    \bigskip\bigskip\hfill\today\bigskip}

\def\stanford{\pageno=1
  \def\returnaddress{Arthur L.~Samuel\par
    Computer Science Department\par
    Stanford University\par
    Stanford CA 94305 USA}
{\null\vskip-10pt
\vbox{\hskip-50pt$\vcenter{\rlap{\seal T}}$\hskip48pt}
\vbox{\null\vskip-66pt\Dunh\parskip=0pt\baselineskip=18pt\obeylines\obeyspaces
   Computer Science Department\par
   Stanford University\par
   Stanford, California 94305}}
    \bigskip\bigskip\hfill\today\bigskip}

%\def\makelabel{\endletter\hbox{\vrule
%    \vbox{\hrule \kern6truept
%      \hbox{\kern6truept\vbox to 3truein{\hsize=\longindentation
%          \smallheadfont\baselineskip9truept\returnaddress
%          \vfill\moveright 3truein\copy\theaddress\vfill}%
%        \kern6truept}\kern6truept\hrule}\vrule}
%  \vfill\eject}

\def\makelabel{\endletter\hbox%
{\vrule\vbox{\hrule \kern6truept
      \hbox{\kern6truept\vbox{\hsize=2truein
    \smallheadfont\baselineskip10truept\returnaddress}}\smallskip\hrule}\vrule}
\medskip
\hbox{\vrule\vbox{\hrule \kern6truept
      \hbox{\kern6truept\vbox{\hsize=3truein
     \copy\theaddress}}\smallskip\hrule}\vrule}\eject}

\def\als{\beginlinemode\nobreak\bigskip
\hskip4truein Sincerely yours,
    \nobreak\bigskip\bigskip\bigskip % space for signature
\hskip4truein Arthur L. Samuel
\bigskip}
\def\fin{\makelabel\end}

%\stanford
\personal
\address
Mr. Randy Finch
532 West 111 St. \#36
New York, NY 10025

\body
Dear Randy:

This may not be quite as personal as a hand written letter, but it is a
bit more readable than my handwriting and I though you might like to see
the kind of letter that our computer produces.  

Every time that I fix
myself some tea, I will now have a ready reminder of your kindness in
remembering me this Christmas.  Thanks a lot.

It is about time for me to send you the enclosed check
so that you will be sure to have enough ready cash to cover your ticket. I
believe that \$2000 should be enough but do let me know if it is not.

I have decided not to come home by way of Rome.  It seems
to be just a bit too much travelling for me. After all, I have seen Margie
in Europe, not in Rome, it is true, but we did have three weeks together
last summer.

I hope that you have gotten your passport by now.  If it is slow in coming,
you should call the visa people and warn them that your application may be
a little late.  My passport came back in just a little more than a week
from the time that I mailed the application.

\als

\fin

\address
Travel Dynamics Inc.
att. Ms.~Harriet E. Harris
1290 Ave.~of the Americas
New York, NY 10104

\body
Dear Ms.~Harris:

I am enclosing a check for \$1691.00 to cover my round trip airplane fare for
the combined Stanford Alumni Indonesia College and Indian Ocean College trips.

I understand that my ticket will be for the following:  San Francisco to Hong
Kong on Singapore Airlines \#1 departing San Francisco at 10:45 PM on
Thursday March 1, 1984; Hong Kong to Denpasar on Garuda Indonesia Air \#875
departing Hong Kong at 3:00 PM on March 5th; Colombo to Singapore on
Singapore Airlines \#27 departing Colombo at 12:50 PM on April 7th; and
Singapore to San Francisco on Singapore Airlines \#2 departing Singapore
at 3:30 PM on April 8th.

\als
\fin 

\personal
\address
TRAV-ALL Visa Service
Att. Mr.~Ray Riddle
P.O. Box 523
Falls Church, VA 22046

\body
Dear Mr. Riddle:

I am enclosing my U.S. passport No. 050207452 issued Dec. 14, 1983, five
passport photographs and the visa application forms as supplied to me by
the Stanford Alumni Association, in connection with the Indian Ocean
College trip from March 15, 1984 to April 8, 1984.

Please note that I am also taking the Indonesia College trip (that preceeds the
Indian Ocean College trip) and that I will be leaving my home on March 1, 1984 or
possibly a few days earlier so that I can break my flight in Hawaii.

Should you wish to reach me by phone, I can be reached on (415)497-3330 during
the day (8:30-11:45AM, 1:00-4:00PM  PST) and on (415)424-4233 during the evenings.
These phones will not normally be answered at other times.

\als
\fin

Prevent Blindness 
Department MM
1208 Pioneer Building
St. Paul, Minnesota 55101-1592

\body
Gentlemen:

I am enclosing a check for one dollar to cover postage and mailing costs
for a copy of your Minnesota Adult Home Eye Screening, as described in a
recent article in Modern Maturity.

\als

\fin

\address
Mr. and Mrs. R. Mussen
40 Pearl Street
Essex Junction, VT 05452

\body
Dear Ron and Louise:

It was nice to hear from you. I am sorry that I did  not write you last Christmas,
but I simply did not write any one.

Bernice died in May of 1982.  She had had a coronary bypass
operation in January of that year and she never fully recovered. I miss
her greatly.  Fortunately, we moved into The Sequoias some years ago, so I
am not as much alone as I would be if I were living in a single family
home.

I was glad to hear that you are retiring, since you both seemed to desire
retirement so very much.  However, it does seem that Ron has plans to keep busy,
and it sounds like you also find plenty to do.

As for me, I am still working and I doubt that I will retire until failing
health actually forces me to do so.  I have now been at Stanford a little
longer than I was at IBM, 17 years at IBM and 17 years and a few months at
Stanford.  I have been unusually lucky in being able to get a job
after I retired from IBM and to hang on to it for
these many years. Yes, I still spend my days in front of a terminal, what
with a terminal in my office, another one in my study at home and an
IBM-PC at home as well.

In a sense, I suppose, I am retired, in that I am very much my own boss
and only work when I want to.  At my own insistance, I have been
gradually reducing my work week so that I am now officially working only
one fourth time although I still put in a 40 or 50 hour week when I am not
off travelling.

Bernice and I had gone around the world on the Rotterdam in 1971 and we
had planned to repeat this trip in 1982.  When Bernice first took sick, we
postponed the trip a year and after Bernice's death, Margaret and Donna
insisted that I simply must take
the trip alone. 

So I started this year off with a long trip. I took my IBM-PC with me
and I gave a series of lectures and demonstrations on the ship.  I had given a
series of lectures
on the Rotterdam in 1971 (that time on the game of Go), so this was
not a particularly new thing for me to do.  It did keep me busy and it was
a good way to get acquainted with the passengers, something that might
otherwise have been hard for me to do.

Then in May I went with Donna, her husband and their two children for a
trip on a wind-jammer in the Caribbean.  This was a bit rugged for a
person my age but I got along very well indeed and I
enjoyed it very much.

Finally, to top it all, I took a rather long European trip in July
and August with Margaret and Donna.  I was given an award that also
paid my expenses to a conference in Germany and I had been asked to give a
talk at the presentation ceremony.
The two girls wanted to be there to witness the
presentation.  Margaret is taking a year's leave from her job at Hartford
University to work on her PhD dissertation studying in Rome, and she was
already in Europe.  So the three of us combined a trip to Germany with a
boat trip down the Rhine, a visit to London and a boat trip along the
`Waterways of Western Europe'.

Having mentioned what Margaret is doing, I must say something about Donna.
She and her husband have been quite successful in writing computer texts.
Pasha had written several small texts that never sold very well and when
he started on a full size book, Donna complained
about his english and he challenged her to see if she could do better.
She had been doing the typing for him so this time instead of typing what
he had written she rewrote every thing in her own words.  The book was an
immediate success.  They have written a second book, following the same
pattern, are now writing a third one and have signeed a contract for a
fourth.

I do count myself fortunate to have such good daughters, and we have
become even more close since Bernice died.  I don't know how I could
managed without them.

But enough of my meanderings.  This letter may arrive too late for
Christmas, but let me wish you both a Merry Christmas and a Happy New
Year.


\als
\fin


\address
San Francisco Passport Agency--M
525 Market St. \#200
San Francisco, CA 94105
\body
Gentlemen:

I am enclosing an application for a new passport together with my old
passport number K1976320 which expires on June 19, 1984, two recent photographs,
and a check for \$35.

My unseemly haste in asking for a renewal at this early date is caused by
the two months that, it seems, must be allowed to get the necessary visa
for my trip and by the India government's requirement that the visitor
have a passport that does not expire for at least six months after
the intended departure date from their country.

I have just learned of this six-month requirement and am somewhat late in
submitting this application.  I plan to leave the U.S. on February 27th,
and I would appreciate any extra effort that you might make to get my
new passport back to me before December 27th if at all possible.

\als
\fin


\def\\{{\tt \char'134}}
\def\lbr{{\tt \char'173}}  \def\rbr{{\tt \char'175}}  \def\rrbr{{\tt \char'175\char'175}}
\def\h{\hbox{$h$}\llap{\raise.5ex\hbox{--}}}
%\def\h{\hbox{$h$}\hskip-6pt\raise4pt\hbox{--}}
\address
Professor R. N. Bracewell
Durand 329A

\body
Dear Ron:

I happened to come across your short paper on Infrared Planetary Detection
while trying to find something else and I was reminded that I had once
intended to show you a better way to define `\h' (at least in \TeX82), to wit:

\\def\\h\lbr\\hbox\lbr\$h\$\rbr\\llap\lbr\\raise.5ex\\hbox\lbr--\rrbr\rbr
$$\h\omega\Phi={dU\over dx}LF$$

This makes the definition font-size independent and so you would not have to change
the definition if you change the font size.


\als
\fin

\address
Mr. Bevan
The Sequoias

\body
Dear Mr. Bevan:

This letter is prompted by the current concern that many residents
have recently been expressing regarding the decision to locate the pool and Jacuzzi
in the ``down below'' location.

As you know, I have always prefered a ``campus level'' location but I have
gone along with the chosen location because I have felt that a pool
near the croquet court was better than no pool at all.  I have
been maintaining a low profile during recent discussions of this matter,
because I did not want to unduely influence people in their independent
assessment of the merits of the different posible locations.

With time, it has become increasingly clear that there are a substantial
number of our residents who would use a pool located at ``campus level''
but who will not use a pool located ``down below''.  Many of these people
are the very ones who would benefit most by the use of these facilities.

Several residents who fall in this catagory have gone out of their way to
tell me that they would be quite unable to get to and from (and especially
from) the ``down below'' location, that they would very much like to be
able to swim, that they have not contributed to the pool fund because of
its projected location, and, finally that they would make substantial
contributions toward a pool if it were to be at ``campus level''.

Perhaps it is time for us to reassess the situation.  Only two viable
``campus level'' sites exist. The one near Building 17 is probably too unpopular
with some of the nearby residents, but the present site of the cutting
garden has never been given serious consideration.

Factors to be considered are: 

1) The cutting garden would have to be relocated or abandoned.  Betty Hone
has stated that she will not manage this after April 1st and that she has been
unable to find a successor.  If necessary, the cutting garden could be
relocated in a number of places, the area to the north west of Building 1
would be perhaps the best.

2) The nearness to residential areas would allow for some reduction in the
elaborateness of the dressing rooms and toilet facilities,
with a substantial saving in costs.

3) The cutting garden area is a bit on the small size, but, in view of 2) above,
the area is still adequate.

4) The pool structure would not be visible from outside of our property, and
the dangers of vandalism would be considerably reduced. Surveillance by our
night watchman would be easier.

5) We would have very much less trouble in getting town of Portola Valley
approval for the project.

6) There is a lack of a usable parking area near the cutting garden
location.  This objection has no merit.  Residents who still own cars
usually have to walk substantial distances to get their cars, and many of
the people who would need tranportation, no longer have cars of
their own.  Parking might be a consideration ``down below'' but it is not at
campus level.

7) While the distance from the health center is somewhat greater that for
the ``down below'' location, residents in the health center would have to
be provided with transportation for either location.

8) Electrical service, water, sewer, and storm-drain connections pose no
particular problems.  Some costs would be involved in providing a gas
connection.

9) There would be no problem in finding locations for solar pamels, either
on the nearby car-port roofs or within the pool structure itself, in
accordance with my recent suggestion which would still be usable in this location.

10) The greater use that would be made of the pool and Jacuzzi would help to
maintain the health and good spirits of our residents, and incidentally, give us a
larger base over which to distribute the maintenance costs.

In view of all the considerations that I have outlined, I would like to recommend
that the pool location be reconsidered. Perhaps the architect should be consulted
in this regard and be given an opportunity to inspect this alternate site.

\als

\annotations
c/c Members of the Pool Committee
\fin


\address
Mr. J. A. Goetz
202D The Commons Way
Fishkill, NY 12524

\body
Dear Jack:

Merry Christmas to you and to Dorothy.

I was away on a trip when your letter of August 24th arrived and I did not
get back in time to answer it before you could have been on your way to
the west coast. I did expected to hear from you while you were in the Palo
Alto area.  I am sorry to be so slow in answering, but I have been away a
lot and extra busy while at home.

I am pleased to learn that the Mid-Hudson Section is doing so well.  At
the moment, I am at loss for anything to offer by way of a recollection of
the early days of the Section.  Somehow or other, I seem to have involved
myself in starting a number of different enterprises that others have made
prosper and I seem to get more credit than I deserve when it is the people
who hang on and make the enterprise a success, such as youself, who deserve
the credit.

I was glad to hear that you are both hale and hearty.  

Bernice died in May of 1982.  She had a heart bypass operation in January
of that year and she never fully recovered. I miss her greatly.  Fortunately,
we moved into a retirement community some years ago, so I am not as much alone
as I would be if I were living in a single family home.

We had planned to go around the world on the Rotterdam in 1982.  When
Bernice first took sick, we postponed the trip a year and after Bernice's
death, Margaret and Donna (our two daughters, do you remember them)
insisted that I simply must take the trip alone.

So I started this year off with a long trip. I took an IBM-pc with me
and I gave a series of lectures and demonstrations on the ship.  I had taught a
class on the Rotterdam in 1971 (that time on the game of Go), so this was
not a particularly new thing for me to do.  It did keep me busy and it was
a good way to get acquainted with the passengers, something that might
otherwise been hard for me to do.

At 82, I am still working, and I have now been at Stanford a little longer than I
was at IBM, 17 years at IBM and 17 years and a few months at Stanford.
I have been unusually lucky in being able to get a job here at Stanford
after I retired and to hang on to it for these many years.

In a sense, I suppose, I have retired, in that I am very much my own boss
and only work when I want to.  At my own insistance, I have been
gradually reducing my work week so that I am now officially working only
one fourth time although I still put in a 40 or 50 hour week when I am at
home.

I do take a lot of time off for trips, having traveled over 45,000 miles
so far this year.  Being away as much as I am, I have given up teaching
and I spend my time doing odd research jobs and just being a sort of handy
man around the department.  For example, I have just finished writing a
beginners manual explaining the typesetting system, called \TeX, on which
I have done a small amount of work.

This letter will be formatted with \TeX, although it will not be a very
good example as I will print it on an on-line printer that we use
for run-of-the-mill work.  This printer prints 384 dots to the inch.  We use a
more elaborate printer at 1000 dots to the inch, or one
at 5333 dots to the inch when producing masters for books that will be
reproduced by photo-offset.
\TeX\ is particularly good for text that involves
mathematical equations. It allows one to use up to 256 different fonts
each with 256 characters, on any one document, and we have well over 500
different fonts available.

Let me again wish you a Merry Christmas.

\als

\annotations

\ps
p.s. I cannot refrain from enclosing two pages from the beginners \TeX\ manual
to show some of the special mathematical symbols that
are available.

\fin


\personal 
%\stanford

\address
The Bank of New York, Trustee
Municipal Investment Trust Fund, 1st Calif.
Att. Mr. Carlos Maldonado
Corporate Trust Division
P.O. Box 11,002
Church Street Station
New York, N.Y. 10249

\body
Dear Sir:

As requested in your letter of 11/28/83, I am returning herewith the
documents that you named, these being, the
Certificate of Ownership, Certificate 1 CA 02442 dated Nov. 1, 1983, for 10
units, Mutual Investment Trust Fund, First California Series, account
number 268 10669930-9, held in the names of Arthur L.  Samuel and Bernice
D. Samuel JT TEN., an Affidavit of Domicile and a certified
copy of the death certificate for my wife Bernice D. Samuel who died on
May 24, 1982.

Will you please transfer owernership of the ten units covered by this
certificate to my name, Arthur L. Samuel residing at 501 Portola Road,
Portola Vally, CA 94025, social security number 091-09-8617 and mail the
new certificate of ownership and the monthly checks to me at my mail
address, namely 501 Portola Road, Box 8214, Portola Valley, CA 94025.

Mrs. Samuel died without leaving a valid will. All claims againt the
estate, funeral and administration expenses have been paid.  There were no
Inheritance and Estate Taxes charged against the estate and by court order
I am listed as her sole heir.

\als
\fin

\address
Mr. Sanjoy Mahajan
121 Wilmar Drive
Pittsburgh, PA 15238
\body
Dear Mr. Mahajan:

This is in reply to your letter of November 21, 1983 in regard to my
checker program.  It has been many years since I last worked on this
program. While there have been numerous attempts made to improve the
program, both by me and by others, the set of parameters as described in
these earlier papers remained fairly good.  As you have probably noticed,
my primary purpose was to study the learning process and the goodness of
play was always a secondary consideration.

About the only thing that I have done since my 1967 paper has been to work
with a few master checker players in an attempt to extract from them the
thought processes that lead them to arrive at their moves.  I have been
singularly unsuccessful in this endeavor. Master checker players seem to
know intuitively what is the best move and when they attempt to
explain the reasons for their moves they usually dredge up a line of
reasoning that seems to have little or nothing to do with the actual
thought processes that lead to their choice.

I am somewhat at loss as to how to answer your specific questions.  Many
of them relate to matters that are covered in detail in the two papers
that you have read and I would be only repeating what I wrote.  Since my
work was related to learning, I actually tried a great many different
schemes for making the calculations of (1) piece advantage, (2) ways of
defining terms and choice of terms, (3) setting value ranges and actual
values as used in the signature tables, (4) setting cut-off points, (5)
the number of different signature tables to use and the decision as to
which one to use, etc.. I could go on referencing your listed questions
but perhaps this is enough to indicate how really impossible it is for me
to answer your questions in any simple fashion.  

I would be very glad to give you a copy of my checker
program if I thought that
you could use it. Unfortunately, it is written in an assembly language for
the DEC 10 and it contains over 40,000 poorly-commented instructions.
It really would only confuse you. Through the years, I have made it
available to many different people and the only people who have been able to
use it were those who had DEC 10's and who were familiar
with its inner workings and with its machine code.
Incidentally, Slagle, whose work on alpha-beta
pruning you mentioned in (9), was one of these, and I was well acquainted
with his work.

I am not sure what you mean when you say that you would like to implement
my program.  If you simply want to write a program that will play a
reasonably good game of checkers, then the linear-polynomial scheme
works fairly well.  If, on the other hand, you want to study machine learning
then you have a long and complicated program ahead of you and you should
review all of the work in AI before settling on a game as your study
vehicle. I still favor games but there are others who do not agree with me.

It should be possible to write a fairly good IBM-PC checker program, I
have a PC at home and I have occasionally thought about doing this.  As
evidence of what can be done, I once wrote a simple checker program
(without learning) for an early home game computer (called the VideoBrain)
that is no longer on the market. The entire program was tailored to fit in
8k bytes of rom memory. This program uses a joy stick for input, it
displays the board on a TV, and it plays a surprisingly good game.
Unfortunately, I am not at liberty to supply copies of this program but it
would be of little help in any case, being written in the assembly code for
a specific chip, and for compilation by an unavailable cross compiler on
an unavailable computer.

Were I to start working on checkers again, I would write the
program in some higher language, probably PASCAL or perhaps C or ADA, to
simplify the programming task and to insure transportability, and accept the
degradation in playing speed that would result.  I might try PROLOG simply
to learn it characteristics.
LISP is often the favored language for
AI research but I would not recommend it for checkers unless one had
access to one of the newer LISP machines.

\als

\annotations

\ps

\fin

\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}

\raggedbottom
\interlinepenalty=1000
\hsize=6.25truein
\voffset=24pt
\advance\vsize by-\voffset
\parindent=0pt
\parskip=0pt
\nopagenumbers
\headline={\ifnum\pageno>1
  \tenrm To \addressee\hfil\today\hfil Page \folio
  \else\hfil\fi}

\def\beginlinemode{\endmode
  \begingroup\obeylines\def\endmode{\par\endgroup}}
\def\beginparmode{\endmode
  \begingroup\parskip=\medskipamount \def\endmode{\par\endgroup}}
\let\endmode=\par
\def\endletter{\endmode\vfill\supereject}

\newdimen\longindentation \longindentation=4truein
\newbox\theaddress
\def\address{\beginlinemode\getaddress}
{\obeylines\gdef\getaddress #1
  #2
  {#1\gdef\addressee{#2}%
    \global\setbox\theaddress=\vbox\bgroup\raggedright%
    \hsize=\longindentation \everypar{\hangindent2em}#2
    \def\endmode{\egroup\endgroup \copy\theaddress \bigskip}}}

\def\body{\beginparmode}
\def\closing{\beginlinemode\getclosing}
{\obeylines\gdef\getclosing #1
  #2
  {#1\nobreak\bigskip \leftskip=\longindentation #2
    \nobreak\bigskip\bigskip\bigskip % space for signature
    \def
    {\endgraf\nobreak}}}
\def\annotations{\beginlinemode\def\par{\endgraf\nobreak}\obeylines\par}
\def\ps{\beginparmode\nobreak
  \interlinepenalty5000\def\par{\endgraf\penalty5000}}

\def\up#1{\leavevmode \raise.16ex\hbox{#1}}
\font\smallheadfont=cmr8 at 8truept
\font\largeheadfont=cmdunh10 at 14.4truept
\font\logofont=manfnt at 14.4truept

\def\alsletterhead{
  \def\sendingaddress{Arthur L. Samuel\par
    The Sequoias\par
    501 Portola Road, box 8214\par
    Portola Valley, CA 94025\par
    \up[415\up]\thinspace 424-4233\par}
  \def\returnaddress{A. L. Samuel\par
    The Sequoias\par
    501 Portola Road, box 8214\par
    Portola Valley, CA 94025 USA}
  \letterhead}

\def\letterhead{\pageno=1 \def\addressee{} \univletterhead
  {\leftskip=\longindentation
    {\baselineskip9truept\smallheadfont\sendingaddress}
    \bigskip\bigskip\rm\today\bigskip}}

\def\univletterhead{\vglue-\voffset
\font\seal=stan70
  \hbox{\hbox to\longindentation{\raise4truemm\hbox{\seal
        \kern2truept X\kern-1.667truept
        \lower2truept\hbox{X}\kern-1.667truept X}\hfil
      \largeheadfont Stanford University\hfil}%
    \kern-\longindentation
    \vbox{\smallheadfont\baselineskip9truept
      \leftskip=\longindentation STANFORD, CA 94305}}
  \vskip2truept\hrule\vskip4truept }

\def\makelabel{\endletter\hbox{\vrule
    \vbox{\hrule \kern6truept
      \hbox{\kern6truept\vbox to 2truein{\hsize=\longindentation
          \smallheadfont\baselineskip9truept\returnaddress
          \vfill\moveright 2truein\copy\theaddress\vfill}%
        \kern6truept}\kern6truept\hrule}\vrule}
  \pageno=0\vfill\eject}

Let's consider {business letters} first. Suppose that you want \TeX\ to
format your {correspondence}, and that you have $n$~letters to send. {mail}
If your computer system contains a file letterformat.tex like the one
described later in this appendix, it's easy to do the job by applying \TeX\ to
a file that looks like this:
\begindisplay
\<optional magnification>\cr
\input letterformat\cr
\<business letter$_1$>\cr
\noalign{\vskip-1pt}
\qquad\vdots\cr
\<business letter$_n$>\cr
\end\cr
\enddisplay
Here each of the $n$ business letters has the form
\begindisplay
\<letterhead>\cr
\address\cr
\<one or more lines of address>\cr
\body\cr
\<one or more paragraphs of text>\cr
\closing\cr
\<one or more lines for salutation and signature>\cr
\<optional annotations>\cr
\<optional postscripts>\cr
\endletter\cr
\makelabel % omit this if you don't want an address label\cr
\enddisplay
The \<letterhead> at the beginning of this construction is usually a
control sequence like \rjdletterhead for letters by R.~J.~D.; each
letter writer can have a personalized letterhead that is stored with the
letterformat macros. The \<optional annotations> at the end are any number
of one-line notes preceded by `\annotations'; the \<optional postscripts>
are any number of paragraphs preceded by `\ps'. When \TeX\ is processing the
\address and the \closing and the optional \annotations, it produces
output line-for-line just as the lines appear in the input file; but when
\TeX\ is processing the \body of the letter and the optional \ps, it
chooses line breaks and justifies lines as it normally does when
typesetting paragraphs in books.

A complete example, together with the resulting output, appears on the
next two pages. This example starts with `\magnification=\magstep1'
because the letter is rather short. Magnification is usually omitted if the
letters are long-winded; `\magnification=\magstephalf' is
appropriate when they are medium-size. The same magnification applies to
all~$n$ letters, so you must run \TeX\ more than once if you want more than
one magnification.

\eject
\begingroup \obeylines

\magnification=\magstep1
\input letterformat
\bigskip
\rjdletterhead % (see the output on the next page)
\bigskip
\address
Prof.~Brian~K. Reid{Reid}
Department of Electrical Engineering
Stanford University
Stanford, CA 94305
\bigskip
\body
Dear Prof.~Reid:
\bigskip
I understand that you are having difficulties with
Alka-Seltzer tablets.  Since there are 25~pills{Alka-Seltzer}{ties}
per bottle, while the manufacturer's directions
recommend ``plop,~plop, fizz,~fizz,'' my colleagues
tell me that you have accumulated a substantial
number of bottles in which there is one tablet
left. % (See the 1978 SCRIBE User Manual, page 90.){Scribe}
\bigskip
At present I am engaged in research on the potential
applications of isolated analgesics. If you would
be so kind as to donate your Alka-Seltzer collection
to our project, I would be more than happy to send
you preprints of any progress reports that we may
publish concerning this critical problem.
\bigskip
\closing
Sincerely,
R. J. Drofnats{Drofnats}
Professor

\annotations
RJD/dek
cc: {\sl The \TeX book}

\ps
P. S. \ If you like, I will check into the
possibility that your donation and the meals that
you have been eating might be tax-deductible, in{IRS}
connection with our research.
\endletter
\makelabel
\eject\endgroup

\def\proofcopy(#1){\ifproofmode\raise.5in\hbox{\sevenrm(#1)}\else\hfil\fi}
\vglue-\topskip \nointerlineskip
\dimen0=\vsize \advance\dimen0 by-1.2pt \advance\dimen0 by-2.1in
\vbox{\hrule
  \hbox{\vrule height \dimen0
    \hbox to 4.25in{\hss\proofcopy(Output page goes here, reduced 50\%.)\hss}
    \vrule}}
\nointerlineskip
\hrule
\line{\vrule height 2.1in
  \hss\proofcopy(Label and stamp go here, reduced 50\%.)\hss\vrule}
\hrule
\vskip 0pt plus .001pt minus .001pt % in case of rounding errors
\eject
If the letter is more than one page long, the addressee, date, and
page number will appear at the top of subsequent pages. For example,
the previous letter comes out as follows, if additional paragraphs are
added to the text:
\medskip
\hrule
\line{\vrule height 3.1127in
  \hfil\proofcopy(First page, reduced to 28.3\%.)\hfil\vrule\hfil
  \proofcopy(Second page, reduced to 28.3\%.)\hfil\vrule}
\hrule
\bigskip
\ninepoint
The macro package letterformat.tex that produces this format begins
with a simple macro that expands to the current {date}.
\beginlines
\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
\endlines

Then comes the specification of page layout, which is ``ragged'' at the
bottom. A rather large \interlinepenalty is used so that page
breaks will tend to occur between paragraphs.
\beginlines
\raggedbottom
\interlinepenalty=1000
\hsize=6.25truein
\voffset=24pt
\advance\vsize by-\voffset
\parindent=0pt
\parskip=0pt
\nopagenumbers
\headline={\ifnum\pageno>1
  \tenrm To \addressee\hfil\today\hfil Page \folio
  \else\hfil\fi}
\endlines

The contents of a letter are typeset either in ``line mode'' (obeying lines)
or in ``paragraph mode'' (producing paragraphs in {block style}). Control
sequences \beginlinemode and \beginparmode are defined to initiate these
modes; and other control sequence, \endmode, is defined and redefined so
that the current mode will terminate properly:
\beginlines
\def\beginlinemode{\endmode
  \begingroup\obeylines\def\endmode{\par\endgroup}}
\def\beginparmode{\endmode
  \begingroup\parskip=\medskipamount \def\endmode{\par\endgroup}}
\let\endmode=\par
\def\endletter{\endmode\vfill\supereject}
\endlines

One of the chief characteristics of this particular business letter format
is a parameter called \longindentation, which is used to indent the
closing material, the date, and certain aspects of the letterhead. The
\address macro creates a box that will be used both in the letter and in
the label on the envelope. If individual lines of the address exceed
\longindentation, they are broken, and hanging indentation is used for any
material that must be carried over.
\beginlines
\newdimen\longindentation \longindentation=4truein
\newbox\theaddress
\def\address{\beginlinemode\getaddress}
{\obeylines\gdef\getaddress #1
  #2
  {#1\gdef\addressee{#2}%
    \global\setbox\theaddress=\vbox\bgroup\raggedright%
    \hsize=\longindentation \everypar{\hangindent2em}#2
    \def\endmode{\egroup\endgroup \copy\theaddress \bigskip}}}
\endlines
(Parameter #2 to \getaddress {parameters, delimited}
will be the contents of the line following \address, i.e., the
name of the addressee.)

The closing macros are careful not to allow a page break anywhere between the
end of the \body and the beginning of a \ps.
\beginlines
\def\body{\beginparmode}
\def\closing{\beginlinemode\getclosing}
{\obeylines\gdef\getclosing #1
  #2
  {#1\nobreak\bigskip \leftskip=\longindentation #2
    \nobreak\bigskip\bigskip\bigskip % space for signature
    \def
    {\endgraf\nobreak}}}
\def\annotations{\beginlinemode\def\par{\endgraf\nobreak}\obeylines\par}
\def\ps{\beginparmode\nobreak
  \interlinepenalty5000\def\par{\endgraf\penalty5000}}
\endlines

The remaining portion of letterformat.tex deals with {letterheads} and
labels, which of course will be different for different organizations.
The following macros were used to generate the examples in this
appendix; they can be modified in more-or-less obvious ways to produce
suitable letterheads of other kinds. Special fonts are generally
needed, and they should be loaded at `true' sizes so that they are not
affected by magnification.  One tiny refinement worth noting here is the
\up macro, which raises {brackets} so that they look better in a
{telephone number}.
\beginlines
\def\up#1{\leavevmode \raise.16ex\hbox{#1}}
\font\smallheadfont=cmr8 at 8truept
\font\largeheadfont=cmdunh10 at 14.4truept
\font\logofont=manfnt at 14.4truept
\smallbreak
\def\rjdletterhead{
  \def\sendingaddress{R. J. DROFNATS, F.T.U.G.\par{TeX Users Group}
    PROFESSOR OF FARM ECOLOGY\par
    TEX.RJD @ SU-SCORE.ARPA\par{atsign}
    \up[415\up]\thinspace 497-4975\par}
  \def\returnaddress{R. J. Drofnats, Dept.~of Farm Ecology\par
    The University of St.~Anford\par
    P. O. Box 1009, Haga Alto, CA 94305 USA}
  \letterhead}
\smallbreak
\def\letterhead{\pageno=1 \def\addressee{} \univletterhead
  {\leftskip=\longindentation
    {\baselineskip9truept\smallheadfont\sendingaddress}
    \bigskip\bigskip\rm\today\bigskip}}
\smallbreak
\def\univletterhead{\vglue-\voffset
  \hbox{\hbox to\longindentation{\raise4truemm\hbox{\logofont
        \kern2truept X\kern-1.667truept
        \lower2truept\hbox{X}\kern-1.667truept X}\hfil
      \largeheadfont The University of St.~Anford\hfil}%
    \kern-\longindentation
    \vbox{\smallheadfont\baselineskip9truept
      \leftskip=\longindentation BOX 1009\par HAGA ALTO, CA 94321}}
  \vskip2truept\hrule\vskip4truept }
\smallbreak
\def\makelabel{\endletter\hbox{\vrule
    \vbox{\hrule \kern6truept
      \hbox{\kern6truept\vbox to 2truein{\hsize=\longindentation
          \smallheadfont\baselineskip9truept\returnaddress
          \vfill\moveright 2truein\copy\theaddress\vfill}%
        \kern6truept}\kern6truept\hrule}\vrule}
  \pageno=0\vfill\eject}
\endlines

\beginchapter Appendix E. Example Formats

Although the plain \TeX\ format of Appendix B is oriented to technical
reports, it can readily be adapted to quite different applications. Examples of
three such adaptations are provided in this appendix: (1)~a~format for
business letters; (2)~a~format for concert programs; (3)~the~format used
to typeset this book.

Let's consider {business letters} first. Suppose that you want \TeX\ to
format your {correspondence}, and that you have $n$~letters to send. {mail}
If your computer system contains a file letterformat.tex like the one
described later in this appendix, it's easy to do the job by applying \TeX\ to
a file that looks like this:
\begindisplay
\<optional magnification>\cr
\input letterformat\cr
\<business letter$_1$>\cr
\noalign{\vskip-1pt}
\qquad\vdots\cr
\<business letter$_n$>\cr
\end\cr
\enddisplay
Here each of the $n$ business letters has the form
\begindisplay
\<letterhead>\cr
\address\cr
\<one or more lines of address>\cr
\body\cr
\<one or more paragraphs of text>\cr
\closing\cr
\<one or more lines for salutation and signature>\cr
\<optional annotations>\cr
\<optional postscripts>\cr
\endletter\cr
\makelabel % omit this if you don't want an address label\cr
\enddisplay
The \<letterhead> at the beginning of this construction is usually a
control sequence like \rjdletterhead for letters by R.~J.~D.; each
letter writer can have a personalized letterhead that is stored with the
letterformat macros. The \<optional annotations> at the end are any number
of one-line notes preceded by `\annotations'; the \<optional postscripts>
are any number of paragraphs preceded by `\ps'. When \TeX\ is processing the
\address and the \closing and the optional \annotations, it produces
output line-for-line just as the lines appear in the input file; but when
\TeX\ is processing the \body of the letter and the optional \ps, it
chooses line breaks and justifies lines as it normally does when
typesetting paragraphs in books.

A complete example, together with the resulting output, appears on the
next two pages. This example starts with `\magnification=\magstep1'
because the letter is rather short. Magnification is usually omitted if the
letters are long-winded; `\magnification=\magstephalf' is
appropriate when they are medium-size. The same magnification applies to
all~$n$ letters, so you must run \TeX\ more than once if you want more than
one magnification.

\eject
\begingroup \obeylines
\magnification=\magstep1
\input letterformat
\bigskip
\rjdletterhead % (see the output on the next page)
\bigskip
\address
Prof.~Brian~K. Reid{Reid}
Department of Electrical Engineering
Stanford University
Stanford, CA 94305
\bigskip
\body
Dear Prof.~Reid:
\bigskip
I understand that you are having difficulties with
Alka-Seltzer tablets.  Since there are 25~pills{Alka-Seltzer}{ties}
per bottle, while the manufacturer's directions
recommend ``plop,~plop, fizz,~fizz,'' my colleagues
tell me that you have accumulated a substantial
number of bottles in which there is one tablet
left. % (See the 1978 SCRIBE User Manual, page 90.){Scribe}
\bigskip
At present I am engaged in research on the potential
applications of isolated analgesics. If you would
be so kind as to donate your Alka-Seltzer collection
to our project, I would be more than happy to send
you preprints of any progress reports that we may
publish concerning this critical problem.
\bigskip
\closing
Sincerely,
R. J. Drofnats{Drofnats}
Professor
\bigskip
\annotations
RJD/dek
cc: {\sl The \TeX book}
\bigskip
\ps
P. S. \ If you like, I will check into the
possibility that your donation and the meals that
you have been eating might be tax-deductible, in{IRS}
connection with our research.
\endletter
\makelabel
\eject\endgroup
\def\proofcopy(#1){\ifproofmode\raise.5in\hbox{\sevenrm(#1)}\else\hfil\fi}
\vglue-\topskip \nointerlineskip
\dimen0=\vsize \advance\dimen0 by-1.2pt \advance\dimen0 by-2.1in
\vbox{\hrule
  \hbox{\vrule height \dimen0
    \hbox to 4.25in{\hss\proofcopy(Output page goes here, reduced 50\%.)\hss}
    \vrule}}
\nointerlineskip
\hrule
\line{\vrule height 2.1in
  \hss\proofcopy(Label and stamp go here, reduced 50\%.)\hss\vrule}
\hrule
\vskip 0pt plus .001pt minus .001pt % in case of rounding errors
\eject
If the letter is more than one page long, the addressee, date, and
page number will appear at the top of subsequent pages. For example,
the previous letter comes out as follows, if additional paragraphs are
added to the text:
\medskip
\hrule
\line{\vrule height 3.1127in
  \hfil\proofcopy(First page, reduced to 28.3\%.)\hfil\vrule\hfil
  \proofcopy(Second page, reduced to 28.3\%.)\hfil\vrule}
\hrule
\bigskip
\ninepoint
The macro package letterformat.tex that produces this format begins
with a simple macro that expands to the current {date}.
\beginlines
\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
\endlines

Then comes the specification of page layout, which is ``ragged'' at the
bottom. A rather large \interlinepenalty is used so that page
breaks will tend to occur between paragraphs.
\beginlines
\raggedbottom
\interlinepenalty=1000
\hsize=6.25truein
\voffset=24pt
\advance\vsize by-\voffset
\parindent=0pt
\parskip=0pt
\nopagenumbers
\headline={\ifnum\pageno>1
  \tenrm To \addressee\hfil\today\hfil Page \folio
  \else\hfil\fi}
\endlines

The contents of a letter are typeset either in ``line mode'' (obeying lines)
or in ``paragraph mode'' (producing paragraphs in {block style}). Control
sequences \beginlinemode and \beginparmode are defined to initiate these
modes; and other control sequence, \endmode, is defined and redefined so
that the current mode will terminate properly:
\beginlines
\def\beginlinemode{\endmode
  \begingroup\obeylines\def\endmode{\par\endgroup}}
\def\beginparmode{\endmode
  \begingroup\parskip=\medskipamount \def\endmode{\par\endgroup}}
\let\endmode=\par
\def\endletter{\endmode\vfill\supereject}
\endlines

One of the chief characteristics of this particular business letter format
is a parameter called \longindentation, which is used to indent the
closing material, the date, and certain aspects of the letterhead. The
\address macro creates a box that will be used both in the letter and in
the label on the envelope. If individual lines of the address exceed
\longindentation, they are broken, and hanging indentation is used for any
material that must be carried over.
\beginlines
\newdimen\longindentation \longindentation=4truein
\newbox\theaddress
\def\address{\beginlinemode\getaddress}
{\obeylines\gdef\getaddress #1
  #2
  {#1\gdef\addressee{#2}%
    \global\setbox\theaddress=\vbox\bgroup\raggedright%
    \hsize=\longindentation \everypar{\hangindent2em}#2
    \def\endmode{\egroup\endgroup \copy\theaddress \bigskip}}}
\endlines
(Parameter #2 to \getaddress {parameters, delimited}
will be the contents of the line following \address, i.e., the
name of the addressee.)

The closing macros are careful not to allow a page break anywhere between the
end of the \body and the beginning of a \ps.
\beginlines
\def\body{\beginparmode}
\def\closing{\beginlinemode\getclosing}
{\obeylines\gdef\getclosing #1
  #2
  {#1\nobreak\bigskip \leftskip=\longindentation #2
    \nobreak\bigskip\bigskip\bigskip % space for signature
    \def
    {\endgraf\nobreak}}}
\def\annotations{\beginlinemode\def\par{\endgraf\nobreak}\obeylines\par}
\def\ps{\beginparmode\nobreak
  \interlinepenalty5000\def\par{\endgraf\penalty5000}}
\endlines

The remaining portion of letterformat.tex deals with {letterheads} and
labels, which of course will be different for different organizations.
The following macros were used to generate the examples in this
appendix; they can be modified in more-or-less obvious ways to produce
suitable letterheads of other kinds. Special fonts are generally
needed, and they should be loaded at `true' sizes so that they are not
affected by magnification.  One tiny refinement worth noting here is the
\up macro, which raises {brackets} so that they look better in a
{telephone number}.
\beginlines
\def\up#1{\leavevmode \raise.16ex\hbox{#1}}
\font\smallheadfont=cmr8 at 8truept
\font\largeheadfont=cmdunh10 at 14.4truept
\font\logofont=manfnt at 14.4truept
\smallbreak
\def\rjdletterhead{
  \def\sendingaddress{R. J. DROFNATS, F.T.U.G.\par{TeX Users Group}
    PROFESSOR OF FARM ECOLOGY\par
    TEX.RJD @ SU-SCORE.ARPA\par{atsign}
    \up[415\up]\thinspace 497-4975\par}
  \def\returnaddress{R. J. Drofnats, Dept.~of Farm Ecology\par
    The University of St.~Anford\par
    P. O. Box 1009, Haga Alto, CA 94305 USA}
  \letterhead}
\smallbreak
\def\letterhead{\pageno=1 \def\addressee{} \univletterhead
  {\leftskip=\longindentation
    {\baselineskip9truept\smallheadfont\sendingaddress}
    \bigskip\bigskip\rm\today\bigskip}}
\smallbreak
\def\univletterhead{\vglue-\voffset
  \hbox{\hbox to\longindentation{\raise4truemm\hbox{\logofont
        \kern2truept X\kern-1.667truept
        \lower2truept\hbox{X}\kern-1.667truept X}\hfil
      \largeheadfont The University of St.~Anford\hfil}%
    \kern-\longindentation
    \vbox{\smallheadfont\baselineskip9truept
      \leftskip=\longindentation BOX 1009\par HAGA ALTO, CA 94321}}
  \vskip2truept\hrule\vskip4truept }
\smallbreak
\def\makelabel{\endletter\hbox{\vrule
    \vbox{\hrule \kern6truept
      \hbox{\kern6truept\vbox to 2truein{\hsize=\longindentation
          \smallheadfont\baselineskip9truept\returnaddress
          \vfill\moveright 2truein\copy\theaddress\vfill}%
        \kern6truept}\kern6truept\hrule}\vrule}
  \pageno=0\vfill\eject}
\endlines